/*---------------------------------------------------------------------
 * File name: hal_flash.h
 *
 * Copyright (c) <2020-2022>, <ChenLong>
 *
 * All rights reserved.
 *
 * Author: ChenLong
 * Email: worldlong@foxmail.com
 *--------------------------------------------------------------------*/
#pragma once
/*
*/
#include "flash.h"
/*
*/
class HAL_Flash
{
public:
  HAL_Flash() {}
 
  void unlock();
  void lock();
  bool erase(uint32_t page_addr);
  int write(uint32_t addr, uint32_t *data, int num);
  int read(uint32_t addr, uint32_t *data, int num);
};



